﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using NickLee.Common;

namespace GPCSC.Web
{
    public partial class chapas : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        //提交
        protected void Button1_Click(object sender, EventArgs e)
        {
            byte[] userInfo = (byte[])base.o_baseTable[c_obj.s_userInfo];
            Hashtable userInfoTable = CompressData.UnCompressHashtable(userInfo);
            Model.CL_Menu_S[] UserMenus = (Model.CL_Menu_S[])userInfoTable["SYS_UserMenu"];
            Model.CL_USER_S users = (Model.CL_USER_S)userInfoTable["SYS_USER"];

            if (ypass.Value != users.PWD.ToString())
            {
                Response.Write("<script>alert('请输入正确的原密码！');</script>");
            }
            else
            {
                Hashtable hta = new Hashtable();
                hta.Add("PWD", this.mpass.Value);
                SQLServerDAL.databyhtable dtable = new SQLServerDAL.databyhtable();
                dtable.databyhtables(hta, "update", "CL_USER_S", "CL_USER_SOID", users.CL_USER_SOID.ToString());
                Response.Write("<script>alert('密码修改成功！');</script>");
            }
        }
    }
}